import {error, get, modal, post} from "../coreModule/CoreCommon";

export class UserInterface {

	@post("/user/user/login",	undefined, false)
	static Login(d?): any {};
	@post("/user/user/logout")
	static Logout(d?): any {};
	@post("/user/user/wx_Code2Session", undefined, false)
	static Code2Session(d?): any {};

	@post("/user/user/get")
	static GetInfo(d?): any {};
	@post("/user/user/edit")
	static EditInfo(d?): any {};

	@post("/user/ident/auth")
	static AuthIdent(d?): any {};
	@post("/user/cert/auth")
	static AuthCert(d?): any {};

	@post("/user/user/follow")
	static FollowUser(d?): any {};
	@get("/user/user/get_followers")
	static GetFollowers(d?): any {};
	@get("/user/user/get_followees")
	static GetFollowees(d?): any {};

	@get("/user/user/get_invitees")
	static GetInvitees(d?): any {};

	@post("/user/stat/get")
	static GetStat(d?): any {};
	@post("/user/user/get_phone_number")
	static GetPhoneNumber(d?): any {};

	@post("/user/user/get_detail")
	static GetDetail(d?):any{};
	@post("/user/user/donate_score")
	static DonateScore(d?):any{};
}

export class UserAlert {

	@modal("请登录", "登录后才能正常使用小程序", true)
	static JudgeLogin(...p): any {}
	@modal("资质错误", "抱歉，您的目前的资质无法进行此操作")
	static CertError(...p): any {}

	@modal("实名认证", "请进行实名认证以正常使用小程序")
	static GotoIdentAuth(...p): any {}

	@modal("已封禁","抱歉，您的账号已被封禁，无法使用小程序")
	static BanError(...p): any {}
}

export class UserThrow {

	@error(200000, "资质错误", UserAlert.CertError)static CertError(...p): any {}
	@error(200001,"账号已封禁",UserAlert.BanError)static BanError(...p): any {}
}
